from django.conf.urls import patterns, include, url

from django.contrib import admin
from main import views
from zdjx_hjhy import settings
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^plugins/(?P<path>.*)$' , 'django.views.static.serve', {'document_root':settings.main_static}),
    #url(r'^index$', views.MainMuenListView.as_view(), name='index'),
    
    url(r'^index$', 'main.views.main_index', name='index'),
    url(r'^tab$', 'main.views.tab', name='tab'),
    url(r'^main_default$', 'main.views.main_default', name='main_default'),
    #url(r'^main_defaultlist$', 'main.views.main_defaultlist', name='main_defaultlist'),
    url(r'^main_defaultedit$', 'main.views.main_defaultedit', name='main_defaultedit'),
    url(r'^main_defaultlist$', views.MainDefaultListView.as_view(), name='main_defaultlist'),
      
    url(r'^(?P<pk>\d+)/template_visvit_update$', views.TemplateVisitCreateView.as_view(), name='template-visit-update'),
    
    #news list 
    url(r'^news_list$', views.NewsManageListView.as_view(), name='news-manage-list'),
    url(r'^news_record_create$', views.NewsRecordCreateView.as_view(), name='news-record-create'),
    url(r'^news_info_save$', 'main.views.news_info_save', name='news-info-save'),
    url(r'^(?P<pk>\d+)/news_record_update$', views.NewsRecordUpdateView.as_view(), name='news-record-update'),
    url(r'^(?P<pk>\d+)/news_record_view$',  views.NewsRecordDetailView.as_view(), name='news-record-view'),
    url(r'^news_message_status_change$', 'main.views.news_message_status_change', name='news-message-change-status'),
    
    #coopertion partner
    url(r'^coopertion_manage_list$', views.CoopertionManageListView.as_view(), name='coopertion-manage-list'),
    url(r'^coopertion_record_create$', views.CoopertionRecordCreateView.as_view(), name='coopertion-record-create'),
    url(r'^coopertion_info_save$', 'main.views.coopertion_info_save', name='coopertion-info-save'),
    url(r'^(?P<pk>\d+)/coopertion_record_update$', views.CoopertionRecordUpdateView.as_view(), name='coopertion-record-update'),
    url(r'^(?P<pk>\d+)/coopertion_record_view$',  views.CoopertionRecordDetailView.as_view(), name='coopertion-record-view'),
    url(r'^coopertion_message_status_change$', 'main.views.coopertion_message_status_change', name='coopertion-message-change-status'),
    
    #web visit img
    url(r'^web_visit_img$', views.WebImgManageListView.as_view(), name='web_visit-img-manage-list'),
    url(r'^(?P<pk>\d+)/webimg_record_update$', views.WebimgRecordUpdateView.as_view(), name='webimg-record-update'),
    url(r'^webimg_info_save$', 'main.views.webimg_info_save', name='webimg-info-save'),
    
    url(r'^web_config_page$', views.WebConfigFormView.as_view(), name='web-config-page-form'),
    url(r'^web_config_page_save$', 'main.views.web_config_page_save', name='web-config-page-save'),
    url(r'^(?P<param1>\d+)/(?P<param2>\d+)/web_config_fileupload$', views.WebConfigUpdateView.as_view(), name='web-config-file-upload'),
    url(r'^web_config_fileupload_save$', 'main.views.web_config_fileupload_save', name='web-config-fileupdate-save'),
    url(r'^change_passowrd$', views.ChangePasswordFormView.as_view(), name='change-password-page-form'),
    url(r'^change_passowrd_save$', 'main.views.change_passowrd_save', name='change-password-save'),
    url(r'^(?P<param>\d+)/web_adv_img_renew$', views.WebAdvImgUpdateView.as_view(), name='web-adv-img-renow'),
    url(r'^(?P<param>\d+)/web_adv_img_list$', views.WebAdvImgListView.as_view(), name='web-adv-img-list'),
    url(r'^(?P<param>\d+)/web_adv_img_renew_byid$', views.WebAdvImgByIdUpdateView.as_view(), name='web-adv-img-byid-renow'),
    
    
)
